<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义对象</title>
  <script type="text/javascript">
    //自定义对象的方式1
    //person 是一个空对象，没有自定义的函数和属性
    var person = new Object();
    console.log("person类型 = " + typeof(person));//object
    person.name = "simple";
    person.age = 20;
    person.say = function (){
      console.log("person 的信息 " + this.name + " " + this.age + " " +this.job);
    }
    //访问属性
    console.log("name = "+ person.age+" "+person.email);
    person.say();
    //小细节，如果没有定义属性，直接使用，就会显示成 undefined
    console.log("address = "+ person.address)
  </script>
</head>
<body>

</body>
</html>